X=lambda s:s.count('1')%2

print(X('1 0 0 1 0'))
